package opera;

import Book.BookList;
import Book.book;

import java.util.Scanner;

/**
 * @Author: shark爱吃辣椒
 * @Date: 2022-19-23:17
 * @Description:
 */
public class Finder {
    public boolean finderfun(BookList bookList){
        Scanner sca = new Scanner(System.in);
        String name = sca.nextLine();
        int bookslength  = bookList.getBooksnum();
        for (int i = 0; i < bookslength; i++) {
            book book = bookList.getbook(i);
            if(book.getName().equals(name)){
                System.out.println(book);
                return true;
            }
        }
        return false;
    }
}
